using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;

namespace Presentation
{
    public class MyUserControl
    {
        #region Attributes

        private Bitmap[] _bmp;
        private int _nbmp;
        private int _ibmp;
        private int _x;
        private int _y;
        private string _thongtin;

        #endregion

        #region Property

        public Bitmap[] Bmp
        {
            get { return _bmp; }
            set
            {
                _bmp = value;
                _nbmp = _bmp.Length;
                _ibmp = 0;
            }
        }

        public int NBmp
        {
            get { return _nbmp; }
            set { _nbmp = value; }
        }

        public int IBmp
        {
            get { return _ibmp; }
            set { _ibmp = value; }
        }
        public int X
        {
            get { return _x; }
            set { _x = value; }
        }

        public int Y
        {
            get { return _y; }
            set { _y = value; }
        }

        public string ThongTin
        {
            get { return _thongtin; }
            set { _thongtin = value; }
        }

        #endregion

        #region Method

        public void Draw(Graphics g)
        {
            g.DrawImage(Bmp[IBmp], X, Y);
        }
        /*
        public void UpdateBitmap()
        {
            IBmp = (IBmp + 1) % NBmp;
        }*/

        #endregion
    }
}
